package com.hc.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@Data
public class StatusVO {
    private int code;
    private String msg;

    //默认是200,"成功",data没有
    public StatusVO() {
        code = 200;
        msg = "成功";
    }

    public StatusVO(int code) {
        this.code = code;
    }

    public StatusVO(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    /**
     * 只有一个对象的话认为对象是data
     *
     * @param data 数据
     */
    public StatusVO(Object data) {
        this.code = 200;
        this.msg = "请求成功";
        this.data = data;
    }

    private Object data;


}
